package com.example.log;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class LogController {

    @GetMapping("/log")
    public void logTest(){
        log.trace("trace日志");
        log.debug("debug日志");
        log.info("info日志");
        log.warn("warn日志");
        log.error("error日志");
        System.out.println(log.isTraceEnabled());
        System.out.println(log.isDebugEnabled());
        System.out.println(log.isInfoEnabled());
        System.out.println(log.isWarnEnabled());
        System.out.println(log.isErrorEnabled());
    }
}
